﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;


namespace WCF_AutoUpdates_Services.WinService
{
    [RunInstaller(true)]
    public partial class WinahrimanAutoUpdateInstaller : System.Configuration.Install.Installer
    {
        public WinahrimanAutoUpdateInstaller()
        {
            InitializeComponent();

            System.ServiceProcess.ServiceInstaller si = new System.ServiceProcess.ServiceInstaller();
            System.ServiceProcess.ServiceProcessInstaller psi = new System.ServiceProcess.ServiceProcessInstaller();

            psi.Installers.Add(si);

            si.ServiceName = typeof(WinService.WinahrimanAutoUpdate).Name;
            si.DisplayName = "Winahriman's Auto Update";
            si.Description = "Winahriman's Auto Udpate";
            si.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
            psi.Account = System.ServiceProcess.ServiceAccount.LocalSystem;
            this.Installers.Add(psi);
        }
    }
}
